import buildBarCode from '../../utils/barCode/index';
//获取应用实例
var app = getApp();
Page({
    data: {
        orderId: "20170825700250406"
    },
    onLoad: function () {
       var data =  app.getStorageSync(app.globalData.cacheOrderResKey);
       buildBarCode('barCode', data.cardNbr, 624, 180);
        this.setData({
            "orderId": data.orderId,
            "cardName": data.cardName
        });
    },
    onHide:function () {
        app.removeStorageSync(app.globalData.cacheOrderResKey);
    },
    detailTap:function (e) {
        var orderId = e.target.dataset.id;
        app.redirectTo({
            url: '../orderdetail/orderdetail?orderId='+orderId
        });
    }
});
